Optimal. Leaf size=144 \[ (a+b)^3 x-\frac {b \left (3 a^2+3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b \left (3 a^2+3 a b+b^2\right ) \tan ^3(c+d x)}{3 d}-\frac {b^2 (3 a+b) \tan ^5(c+d x)}{5 d}+\frac {b^2 (3 a+b) \tan ^7(c+d x)}{7 d}-\frac {b^3 \tan ^9(c+d x)}{9 d}+\frac {b^3 \tan ^{11}(c+d x)}{11 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 144, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3742, 1168,
209} \begin {gather*} \frac {b \left (3 a^2+3 a b+b^2\right ) \tan ^3(c+d x)}{3 d}-\frac {b \left (3 a^2+3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b^2 (3 a+b) \tan ^7(c+d x)}{7 d}-\frac {b^2 (3 a+b) \tan ^5(c+d x)}{5 d}+x (a+b)^3+\frac {b^3 \tan ^{11}(c+d x)}{11 d}-\frac {b^3 \tan ^9(c+d x)}{9 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 1168
Rule 3742
Rubi steps
\begin {align*} \int \left (a+b \tan ^4(c+d x)\right )^3 \, dx &=\frac {\text {Subst}\left (\int \frac {\left (a+b x^4\right )^3}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (-b \left (3 a^2+3 a b+b^2\right )+b \left (3 a^2+3 a b+b^2\right ) x^2-b^2 (3 a+b) x^4+b^2 (3 a+b) x^6-b^3 x^8+b^3 x^{10}+\frac {(a+b)^3}{1+x^2}\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac {b \left (3 a^2+3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b \left (3 a^2+3 a b+b^2\right ) \tan ^3(c+d x)}{3 d}-\frac {b^2 (3 a+b) \tan ^5(c+d x)}{5 d}+\frac {b^2 (3 a+b) \tan ^7(c+d x)}{7 d}-\frac {b^3 \tan ^9(c+d x)}{9 d}+\frac {b^3 \tan ^{11}(c+d x)}{11 d}+\frac {(a+b)^3 \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=(a+b)^3 x-\frac {b \left (3 a^2+3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b \left (3 a^2+3 a b+b^2\right ) \tan ^3(c+d x)}{3 d}-\frac {b^2 (3 a+b) \tan ^5(c+d x)}{5 d}+\frac {b^2 (3 a+b) \tan ^7(c+d x)}{7 d}-\frac {b^3 \tan ^9(c+d x)}{9 d}+\frac {b^3 \tan ^{11}(c+d x)}{11 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.67, size = 128, normalized size = 0.89 \begin {gather*} \frac {(a+b)^3 \text {ArcTan}(\tan (c+d x))}{d}+\frac {b \tan (c+d x) \left (-3465 \left (3 a^2+3 a b+b^2\right )+1155 \left (3 a^2+3 a b+b^2\right ) \tan ^2(c+d x)-693 b (3 a+b) \tan ^4(c+d x)+495 b (3 a+b) \tan ^6(c+d x)-385 b^2 \tan ^8(c+d x)+315 b^2 \tan ^{10}(c+d x)\right )}{3465 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 187, normalized size = 1.30
method | result | size |
norman | \(\left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) x -\frac {b^{3} \left (\tan ^{9}\left (d x +c \right )\right )}{9 d}+\frac {b^{3} \left (\tan ^{11}\left (d x +c \right )\right )}{11 d}-\frac {b \left (3 a^{2}+3 a b +b^{2}\right ) \tan \left (d x +c \right )}{d}+\frac {b \left (3 a^{2}+3 a b +b^{2}\right ) \left (\tan ^{3}\left (d x +c \right )\right )}{3 d}-\frac {b^{2} \left (3 a +b \right ) \left (\tan ^{5}\left (d x +c \right )\right )}{5 d}+\frac {b^{2} \left (3 a +b \right ) \left (\tan ^{7}\left (d x +c \right )\right )}{7 d}\) | \(149\) |
derivativedivides | \(\frac {\frac {b^{3} \left (\tan ^{11}\left (d x +c \right )\right )}{11}-\frac {b^{3} \left (\tan ^{9}\left (d x +c \right )\right )}{9}+\frac {3 a \,b^{2} \left (\tan ^{7}\left (d x +c \right )\right )}{7}+\frac {b^{3} \left (\tan ^{7}\left (d x +c \right )\right )}{7}-\frac {3 a \,b^{2} \left (\tan ^{5}\left (d x +c \right )\right )}{5}-\frac {b^{3} \left (\tan ^{5}\left (d x +c \right )\right )}{5}+a^{2} b \left (\tan ^{3}\left (d x +c \right )\right )+a \,b^{2} \left (\tan ^{3}\left (d x +c \right )\right )+\frac {b^{3} \left (\tan ^{3}\left (d x +c \right )\right )}{3}-3 a^{2} b \tan \left (d x +c \right )-3 a \,b^{2} \tan \left (d x +c \right )-b^{3} \tan \left (d x +c \right )+\left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) \arctan \left (\tan \left (d x +c \right )\right )}{d}\) | \(187\) |
default | \(\frac {\frac {b^{3} \left (\tan ^{11}\left (d x +c \right )\right )}{11}-\frac {b^{3} \left (\tan ^{9}\left (d x +c \right )\right )}{9}+\frac {3 a \,b^{2} \left (\tan ^{7}\left (d x +c \right )\right )}{7}+\frac {b^{3} \left (\tan ^{7}\left (d x +c \right )\right )}{7}-\frac {3 a \,b^{2} \left (\tan ^{5}\left (d x +c \right )\right )}{5}-\frac {b^{3} \left (\tan ^{5}\left (d x +c \right )\right )}{5}+a^{2} b \left (\tan ^{3}\left (d x +c \right )\right )+a \,b^{2} \left (\tan ^{3}\left (d x +c \right )\right )+\frac {b^{3} \left (\tan ^{3}\left (d x +c \right )\right )}{3}-3 a^{2} b \tan \left (d x +c \right )-3 a \,b^{2} \tan \left (d x +c \right )-b^{3} \tan \left (d x +c \right )+\left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right ) \arctan \left (\tan \left (d x +c \right )\right )}{d}\) | \(187\) |
risch | \(a^{3} x +3 a^{2} b x +3 a \,b^{2} x +b^{3} x -\frac {4 i b \left (751674 b^{2} {\mathrm e}^{12 i \left (d x +c \right )}+751674 b^{2} {\mathrm e}^{10 i \left (d x +c \right )}+1358280 a^{2} {\mathrm e}^{8 i \left (d x +c \right )}+6930 a^{2}+3254 b^{2}+10395 b^{2} {\mathrm e}^{20 i \left (d x +c \right )}+93555 a^{2} {\mathrm e}^{18 i \left (d x +c \right )}+438900 b^{2} {\mathrm e}^{14 i \left (d x +c \right )}+1503810 a^{2} {\mathrm e}^{12 i \left (d x +c \right )}+51975 b^{2} {\mathrm e}^{18 i \left (d x +c \right )}+381150 a^{2} {\mathrm e}^{16 i \left (d x +c \right )}+219450 b^{2} {\mathrm e}^{16 i \left (d x +c \right )}+928620 a^{2} {\mathrm e}^{14 i \left (d x +c \right )}+1697850 a^{2} {\mathrm e}^{10 i \left (d x +c \right )}+317460 b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+634920 b^{2} {\mathrm e}^{8 i \left (d x +c \right )}+526680 a b \,{\mathrm e}^{16 i \left (d x +c \right )}+145530 a b \,{\mathrm e}^{18 i \left (d x +c \right )}+2109492 a b \,{\mathrm e}^{10 i \left (d x +c \right )}+20790 a b \,{\mathrm e}^{20 i \left (d x +c \right )}+1219680 a b \,{\mathrm e}^{14 i \left (d x +c \right )}+1915452 a b \,{\mathrm e}^{12 i \left (d x +c \right )}+910800 a b \,{\mathrm e}^{6 i \left (d x +c \right )}+333630 a b \,{\mathrm e}^{4 i \left (d x +c \right )}+75042 a b \,{\mathrm e}^{2 i \left (d x +c \right )}+1655280 a b \,{\mathrm e}^{8 i \left (d x +c \right )}+8712 a b +10395 a^{2} {\mathrm e}^{20 i \left (d x +c \right )}+762300 a^{2} {\mathrm e}^{6 i \left (d x +c \right )}+287595 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}+126995 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+65835 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+25399 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}\right )}{3465 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{11}}\) | \(471\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 167, normalized size = 1.16 \begin {gather*} a^{3} x + \frac {{\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a^{2} b}{d} + \frac {{\left (15 \, \tan \left (d x + c\right )^{7} - 21 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3} + 105 \, d x + 105 \, c - 105 \, \tan \left (d x + c\right )\right )} a b^{2}}{35 \, d} + \frac {{\left (315 \, \tan \left (d x + c\right )^{11} - 385 \, \tan \left (d x + c\right )^{9} + 495 \, \tan \left (d x + c\right )^{7} - 693 \, \tan \left (d x + c\right )^{5} + 1155 \, \tan \left (d x + c\right )^{3} + 3465 \, d x + 3465 \, c - 3465 \, \tan \left (d x + c\right )\right )} b^{3}}{3465 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.67, size = 145, normalized size = 1.01 \begin {gather*} \frac {315 \, b^{3} \tan \left (d x + c\right )^{11} - 385 \, b^{3} \tan \left (d x + c\right )^{9} + 495 \, {\left (3 \, a b^{2} + b^{3}\right )} \tan \left (d x + c\right )^{7} - 693 \, {\left (3 \, a b^{2} + b^{3}\right )} \tan \left (d x + c\right )^{5} + 1155 \, {\left (3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \tan \left (d x + c\right )^{3} + 3465 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} d x - 3465 \, {\left (3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \tan \left (d x + c\right )}{3465 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.50, size = 224, normalized size = 1.56 \begin {gather*} \begin {cases} a^{3} x + 3 a^{2} b x + \frac {a^{2} b \tan ^{3}{\left (c + d x \right )}}{d} - \frac {3 a^{2} b \tan {\left (c + d x \right )}}{d} + 3 a b^{2} x + \frac {3 a b^{2} \tan ^{7}{\left (c + d x \right )}}{7 d} - \frac {3 a b^{2} \tan ^{5}{\left (c + d x \right )}}{5 d} + \frac {a b^{2} \tan ^{3}{\left (c + d x \right )}}{d} - \frac {3 a b^{2} \tan {\left (c + d x \right )}}{d} + b^{3} x + \frac {b^{3} \tan ^{11}{\left (c + d x \right )}}{11 d} - \frac {b^{3} \tan ^{9}{\left (c + d x \right )}}{9 d} + \frac {b^{3} \tan ^{7}{\left (c + d x \right )}}{7 d} - \frac {b^{3} \tan ^{5}{\left (c + d x \right )}}{5 d} + \frac {b^{3} \tan ^{3}{\left (c + d x \right )}}{3 d} - \frac {b^{3} \tan {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a + b \tan ^{4}{\left (c \right )}\right )^{3} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 3499 vs.
\(2 (134) = 268\).
time = 15.36, size = 3499, normalized size = 24.30 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 11.66, size = 180, normalized size = 1.25 \begin {gather*} \frac {{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (a^2\,b+a\,b^2+\frac {b^3}{3}\right )}{d}+\frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (c+d\,x\right )\,{\left (a+b\right )}^3}{a^3+3\,a^2\,b+3\,a\,b^2+b^3}\right )\,{\left (a+b\right )}^3}{d}-\frac {b^3\,{\mathrm {tan}\left (c+d\,x\right )}^9}{9\,d}+\frac {b^3\,{\mathrm {tan}\left (c+d\,x\right )}^{11}}{11\,d}-\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (3\,a^2\,b+3\,a\,b^2+b^3\right )}{d}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^5\,\left (\frac {b^3}{5}+\frac {3\,a\,b^2}{5}\right )}{d}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^7\,\left (\frac {b^3}{7}+\frac {3\,a\,b^2}{7}\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________